package com.sky.mapper;

import com.sky.entity.OrderDetail;
import org.apache.ibatis.annotations.Select;

import java.util.ArrayList;
import java.util.List;

public interface OrderDetailMapper {

    /**
     * 插入订单详情数据
     * @param orderDetails
     */
    void save(ArrayList<OrderDetail> orderDetails);


    /**
     * 根据订单id查订单详情
     * @return
     */
    @Select("select * from order_detail where order_id = #{id}")
    List<OrderDetail> selectByOrderId(Long id);
}
